<template>
  <div>
    
      <van-nav-bar
        title="确定订单"
        left-text="返回"
        left-arrow
        @click-left="onClickLeft"
      />

    <div class="header">
      <div class="left">
        <span>订单已取消</span>
      </div>
      <img src="../../assets/cancel.ff91da7.png" alt="" />
    </div>
    <div class="space"></div>
    <div class="test">
      <div class="top1">
        <img :src="imgUrl" alt="" />
        <div class="right">
          <span style="font-size: 15px; text-align: left"
            >{{masterName}}</span
          >
          <div class="bottom">
            <span>￥{{price/100}}</span>
            <span>x{{buyNum}}</span>
          </div>
        </div>
      </div>
    </div>
    <div class="body">
      <div class="box1">
        <span>商品金额</span>
        <span>￥{{total}}</span>
      </div>
      <div class="box1">
        <span>运费</span>
        <span v-if="total<100">￥{{yunfei}}</span>
        <span v-else>￥{{yunfei=0}}</span>
      </div>
      <div class="box1">
        <span>实付</span>
        <span>￥{{total*1+yunfei}}</span>
      </div>
    </div>
    <div class="footer">
      <div class="box1">
        <span>实付</span>
        <input type="button" value="复制" />
      </div>
      <div class="box1">
        <span>实付</span>
      </div>
    </div>
    <div class="fixed">
      <span>订单状态:已取消</span>
      <input type="button" value="重新购买" />
    </div>
  </div>
</template>

<script>
export default {  
  data() {
    return {
      imgUrl:this.$route.query.imgUrl,
      masterName:this.$route.query.masterName,
      buyNum:this.$route.query.buyNum,
      price:this.$route.query.price,
      total:this.$route.query.total,
      yunfei:10
    }
  },
  created() {
  },
    methods:{
        onClickLeft(){
            history.back()
        }
    }
};
</script>

<style scoped>
* {
  padding: 0;
  margin: 0;

  box-sizing: border-box;
}
body {
  background-color: rgb(244, 244, 244);
}
.top {
  height: 46px;
  display: flex;
  align-items: center;
  background-color: white;
}

.left {
  display: flex;
  width: 100px;
  justify-content: flex-end;
  background-color: white;
  align-items: center;
}

.left img {
  height: 16px;
  padding-top: 2px;
  margin-right: 5px;
  background-color: white;
}

.left span {
  color: #c03131;
  padding-left: 4 px;

  background-color: white;
}

.right {
  width: 100%;
  text-align: center;
  font-size: 17px;
  background-color: white;
}
.top .right {
  padding-right: 50px;
  background-color: white;
}

span {
  background-color: white;
}
a {
  text-decoration: none;
}
.header {
  height: 80px;
  width: 100%;
  background-color: rgb(197, 53, 53);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 40px;
  padding-right: 30px;
}
.header .left {
  background-color: rgb(197, 53, 53);
}
.header span {
  background-color: rgb(197, 53, 53);
  color: white;
  font-size: 16px;
}
.header img {
  height: 67px;
  background-color: rgb(197, 53, 53);
}
.space {
  height: 40px;
  width: 100%;
  background-color: white;
}
.test {
  height: 106px;
  padding-left: 16px;
  padding-right: 16px;
  background-color: white;
}
.top1 img {
  height: 90px;
  background-color: white;
}
.test .top1 {
  height: 100px;
  display: flex;
  align-items: center;
  background-color: white;
}
.test .top1 .right {
  flex-grow: 1;
  flex-direction: column;
  display: flex;
  height: 90px;
  justify-content: space-between;
  background-color: white;
}
.bottom {
  display: flex;
  justify-content: space-between;
  background-color: white;
}
.body {
  height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 15px;
  background-color: white;
  margin-top: 10px;
}
.box1 {
  height: 33px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  background-color: white;
}
.footer {
  height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 15px;
  background-color: white;
  margin-top: 10px;
}
.fixed {
  height: 49px;
  width: 100%;
  background-color: white;
  position: fixed;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
}
.fixed input {
  height: 30px;
  width: 78px;
  border: 1px solid rgb(244, 244, 244);
  background-color: white;
  font-size: 100%;
}
.box1 input {
  height: 21px;
  width: 30px;
  border: 1px solid rgb(244, 244, 244);
  background-color: white;
  font-size: 100%;
}
</style>